import React from 'react';
import {HashRouter,Switch,Route,Redirect} from 'react-router-dom'
import './App.css';
// import 'antd/dist/antd.css' //或者在css文件里面  @import '~antd/dist/antd.css';
import Login from './component/Login/Login'
import Index from './component/Index/Index'
import Xitongshouye from "./component/Xitongshouye/Xitongshouye";
import Yuangongguanli from "./component/Yuangongguanli/Yuangongguanli";
import MyProduct from "./component/Shangpinguanli/MyProduct";
import Xiaoshouguanli from "./component/Xiaoshouguanli/Xiaoshouguanli";
import Cuxiaohuodong from "./component/Cuxiaohuodong/Cuxiaohuodong";
import Shangpinshanghuo from "./component/Shangpinshanghuo/Shangpinshanghuo";
import Shouyinmaidan from "./component/Shouyinmaidan/Shouyinmaidan";
function App() {
  return (
    <div className="App">
        <HashRouter>
            <Switch>
                <Route path='/Login' component={Login}/>
                <Route path='/Index' render={()=><Index>
                   <Route path='/Index/Xitongshouye' component={Xitongshouye}/>
                   <Route path='/Index/Yuangongguanli' component={Yuangongguanli}/>
                   <Route path='/Index/Shangpinguanli' component={MyProduct}/>
                   <Route path='/Index/Xiaoshouguanli' component={Xiaoshouguanli}/>
                   <Route path='/Index/Cuxiaohuodong' component={Cuxiaohuodong}/>
                   <Route path='/Index/Shangpinshanghuo' component={Shangpinshanghuo}/>
                   <Route path='/Index/Shouyinmaidan' component={Shouyinmaidan}/>
                    <Route path='/Index/' exact render={()=><Redirect to='/Index/Xitongshouye'/>}/>
                </Index>}/>
                <Route path='/' exact render={()=><Redirect to='/Login'/>}/>

            </Switch>
        </HashRouter>
    </div>
  );
}

export default App;
